﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nuclex.Game.States;
using Nuclex.UserInterface;
using Nuclex.Input;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Storage;
using System.IO;


namespace WarPigs
{
    class OpeningScreenGameState : IGameState
    {
        //Drawable Game State variables
        GraphicsDeviceManager graphics;
        GraphicsDevice device;
        SpriteBatch spriteBatch;
        ContentManager Content;
        private GameStateManager gameStateManager;
        WarPigs game;

        //GUI
        private GuiManager guiManager;
        private InputManager inputManager;

        public LocalPlayerData localPlayerData;


        
        public OpeningScreenGameState(GraphicsDeviceManager passedGraphics, GraphicsDevice passedDevice, ContentManager passedContent, SpriteBatch passedBatch, GuiManager passedManager, InputManager passedInput, GameStateManager passedStateManager, WarPigs passedGame)
        {
            graphics = passedGraphics;
            device = passedDevice;
            Content = passedContent;
            spriteBatch = passedBatch;
            guiManager = passedManager;
            inputManager = passedInput;
            gameStateManager = passedStateManager;
            game = passedGame;          
        }

         public void Enter()
        {
            localPlayerData = new LocalPlayerData(game);

            //Create Controls
            while (0 < 1)
            {
                //game.Window.Title = localPlayerData.data.pmcName;
                if (localPlayerData.data.pmcName == " ")
                {
                    continue;
                }
                else
                {
                    break;
                }
            }
            game.localPlayerData = localPlayerData;
            game.ChangeState("mainMenuGameState");
        }

        public void Leave()
        {
        }

        public void Pause()
        {
        }

        public void Resume()
        {
        }
    }
}
